1. Field
The present invention relates to providing constants in processing systems.
2. Background Art
Many processing systems include a central processing unit (CPU) and a graphics processing unit (GPU). The CPU is a largely serial device that processes instructions sequentially, with subsequent instructions often relying on the results of previous instructions. The GPU, on the other hand, is a highly parallelized device, often including multiple execution units. Through its parallelized architecture, a GPU can be especially apt at executing graphics commands that often include the same operation executed on a multitude of different data sets (e.g., operations to change the state of pixels of a display).
Early GPUs included a hardware storage that stored a single set of state associated with commands being executed by the GPU. This state information can include, for example, constants that the command will access during execution. Thus, every time a command associated with different state information had to be executed, the launching of that command would have to wait tor the previous command to finish executing so that the state information could be safely overwritten without affecting the command currently in flight.
To overcome the limitations of these early GPUs, GPUs were developed that include hardware storage able to store a number of different sets of state information (e.g., GPUs that implemented DirectX 9). For example, some GPUs have hardware storage able to store eight sets of state information. Each of these sets of information included a number of constants that the command will access during execution. This hardware storage, however, can be expensive in terms of board or die space. Thus, many newer devices have eliminated hardware-based constants storage (e.g., GPUs that implement DirectX 10). Newer programs, associated with these newer devices, have been written to allocate portions of memory the execution engine can access when constants are needed. Older programs configured to access stored hardware-based constants, however, cannot be executed on these newer devices.